A Consistent Semantics of Self-adjusting Computation
نویسندگان
چکیده
This paper presents a semantics of self-adjusting computation and proves that the semantics are correct and consistent. The semantics integrate change propagation with the classic idea of memoization to enable reuse of computations under mutation to memory. During evaluation, reuse of a computation via memoization triggers a change propagation that adjusts the reused computation to reflect the mutated memory. Since the semantics integrate memoization and change-propagation, it involves both non-determinism (due to memoization) and mutation (due to change propagation). Our consistency theorem states that the non-determinism is not harmful: any two evaluations of the same program starting at the same state yield the same result. Our correctness theorem states that mutation is not harmful: self-adjusting programs are consistent with purely functional programming. We formalize the semantics and their meta-theory in the LF logical framework and machine check our proofs using Twelf.
منابع مشابه
A duality between LM-fuzzy possibility computations and their logical semantics
Let X be a dcpo and let L be a complete lattice. The family σL(X) of all Scott continuous mappings from X to L is a complete lattice under pointwise order, we call it the L-fuzzy Scott structure on X. Let E be a dcpo. A mapping g : σL(E) −> M is called an LM-fuzzy possibility valuation of E if it preserves arbitrary unions. Denote by πLM(E) the set of all LM-fuzzy possibility valuations of E. T...
متن کاملA generalization of the Chen-Wu duality into quantale-valued setting
With the unit interval [0,1] as the truth value table, Chen and Wupresented the concept of possibility computation over dcpos.Indeed, every possibility computation can be considered as a[0,1]-valued Scott open set on a dcpo. The aim of this paper is tostudy Chen-Wu's duality on quantale-valued setting. For clarity,with a commutative unital quantale $L$ as the truth value table, weintroduce a c...
متن کاملProgrammable Self-Adjusting Computation
Self-adjusting computation is a paradigm for programming incremental computations that efficiently respond to input changes by updating the output in time proportional to the changes in the structure of the computation. This dissertation defends the thesis that high-level programming abstractions improve the experience of reading, writing, and reasoning about and the efficiency of self-adjustin...
متن کاملNon-monotonic Self-Adjusting Computation
Self-adjusting computation is a language-based approach to writing programs that respond dynamically to input changes by maintaining a trace of the computation consistent with the input, thus also updating the output. For monotonic programs, i.e. where localized input changes cause localized changes in the computation, the trace can be repaired efficiently by insertions and deletions. However, ...
متن کاملSelf-Adjusting Programming
This papers proposes techniques for writing self-adjusting programs that can adjust to any change to their data (e.g., inputs, decisions made during the computation) etc. We show that the techniques are efficient by considering a number of applications including several sorting algorithms, and the Graham Scan, and the quick hull algorithm for computing convex hulls. We show that the techniques ...
متن کامل